<html>
<head><meta charset="utf-8"><title>Help Support ssh-agent in ssh2-rs on Windows · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Help.20Support.20ssh-agent.20in.20ssh2-rs.20on.20Windows.html">Help Support ssh-agent in ssh2-rs on Windows</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="218747376"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Help%20Support%20ssh-agent%20in%20ssh2-rs%20on%20Windows/near/218747376" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> yodal <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Help.20Support.20ssh-agent.20in.20ssh2-rs.20on.20Windows.html#218747376">(Dec 03 2020 at 20:06)</a>:</h4>
<p>Cargo and other official Rust programs currently do not support ssh-agent on Windows. The root cause of this is that libssh2 (the C library that backs ssh2-rs which is then used by Cargo, etc.) does not currently support the ssh-agent on Windows due to implementation differences between the Unix OpenSSH ssh-agent and the Windows OpenSSH ssh-agent. I have written up a <a href="https://github.com/libssh2/libssh2/pull/517">PR</a> adding support for the Windows ssh-agent, but due to unfamiliarity with Windows the maintainers don't want to merge it just yet.</p>
<p>This is where those of you reading this come in. The libssh2 maintainers would like it if more Windows devs/users could review my PR before they merge it. If you have knowledge of Windows programming in C I would appreciate if you could review my code and/or test it.</p>
<p>Personally, I tested my changes by modifying ssh2-rs to use my PR branch and then ran a couple of simple test programs using the modified ssh2-rs. I've also patched Cargo to use my locally modified ssh2-rs and tested it by using cargo in scenarios that would have failed before, namely when checking out git repo crates over ssh.</p>
<p>Thank you in advance to all those who review and test the changes.</p>



<a name="218768910"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Help%20Support%20ssh-agent%20in%20ssh2-rs%20on%20Windows/near/218768910" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Help.20Support.20ssh-agent.20in.20ssh2-rs.20on.20Windows.html#218768910">(Dec 03 2020 at 23:21)</a>:</h4>
<p>Some people in <a class="stream" data-stream-id="242869" href="/#narrow/stream/242869-t-compiler.2Fwindows">#t-compiler/windows</a> may know more</p>



<a name="218792160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Help%20Support%20ssh-agent%20in%20ssh2-rs%20on%20Windows/near/218792160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> yodal <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Help.20Support.20ssh-agent.20in.20ssh2-rs.20on.20Windows.html#218792160">(Dec 04 2020 at 04:03)</a>:</h4>
<p>It didn't quite feel right posting this under there as this isn't compiler related. I'm already stretching it a bit posting it in a Rust community, which I'm only doing because my end goal is to get everything updated so Cargo supports the Windows ssh-agent.</p>



<a name="218815165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Help%20Support%20ssh-agent%20in%20ssh2-rs%20on%20Windows/near/218815165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Help.20Support.20ssh-agent.20in.20ssh2-rs.20on.20Windows.html#218815165">(Dec 04 2020 at 10:25)</a>:</h4>
<p>In that case asking on the community discord may help, it’s the most active place I believe</p>



<a name="218837908"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Help%20Support%20ssh-agent%20in%20ssh2-rs%20on%20Windows/near/218837908" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Help.20Support.20ssh-agent.20in.20ssh2-rs.20on.20Windows.html#218837908">(Dec 04 2020 at 14:20)</a>:</h4>
<p>Putting it on the next TWIR might also help if nobody jumps in until then.</p>



<a name="218870067"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Help%20Support%20ssh-agent%20in%20ssh2-rs%20on%20Windows/near/218870067" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> yodal <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Help.20Support.20ssh-agent.20in.20ssh2-rs.20on.20Windows.html#218870067">(Dec 04 2020 at 18:06)</a>:</h4>
<p>Putting it out in TWIR isn't a bad idea</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>